/// \file sroiq_utils.h.
///============================================================================\n
/// Name        : sroiq_utils.h\n
/// Author      : Gergely Lukacsy (info@dlog-reasoner.org)\n
/// Version     : 0.01\n
/// Copyright   : DERI\n
/// Description : Common SROIQ constants and typedefs, header file.\n
/// 
/// This file is part of the DParser and DLog 2 projects.\n
///============================================================================

#ifndef SROIQ_UTILS_H_
#define SROIQ_UTILS_H_

class CONCEPT;
class ROLE;
class INSTANCE;
class SUBCONCEPT;
class EQUIVALENTCONCEPTS;
class SUBROLE;
class EQUIVALENTROLES;
class DISJOINTROLES;
class DISJOINTCONCEPTS;
class DIFFERENTINSTANCES;
class HASKEY;
class SAMEINSTANCES;
class RINSTANCE;
class CINSTANCE;

/// Constant denoting if a role is functional.
const DWORD bFUNCTIONAL        = 	((DWORD) (1 << 0)); // 0x01

/// Constant denoting if a role is inverse functional.
const DWORD bINVERSEFUNCTIONAL =     ((DWORD) (1 << 1)); // 0x02

/// Constant denoting if a role is reflexive.
const DWORD bREFLEXIVE   	  =	   	((DWORD) (1 << 2)); // 0x04

/// Constant denoting if a role is irreflexive.
const DWORD bIRREFLEXIVE       =	    ((DWORD) (1 << 3)); // 0x08

/// Constant denoting if a role is symmetric.
const DWORD bSYMMETRIC   	  =		((DWORD) (1 << 4)); // 0x10

/// Constant denoting if a role is asymmetric (which is not the same as not symmetric).
const DWORD bASYMMETRIC	      =		((DWORD) (1 << 5)); // 0x20

/// Constant denoting if a role is transitive.
const DWORD bTRANSITIVE	      =		((DWORD) (1 << 6)); // 0x40

/// Constant denoting if a role/concept is concrete, i.e. it is a datatype property, etc.
const DWORD bCONCRETE	      =		((DWORD) (1 << 7)); // 0x80

/// Constant denoting if a given instance is a literal.
const DWORD bLITERAL	          =		((DWORD) (1 << 8)); // 0x100


/// Parameter key values.
enum PARAMKEYS {parPREFIX, parNAME, parIRI, parCARDINALITY, parASSERTIONTYPE, parABSTRACTTYPE, parCARDINALITYTYPE, 
parPROPERTYTYPE, parSUBCONCEPTORIGIN, parEQUIVALENTCONCEPTORIGIN, parEQUIVALENTROLEORIGIN,
parINSTANCETYPE, parFACETDESCRIPTION};

/// Parameter values for parPROPERTYTYPE.
enum PROPTYPES {valOBJECTPROPERTY, valDATAPROPERTY};

/// Parameter values for parCARDINALITYTYPE
enum CARDTYPES {valMINCARDINALITY, valMAXCARDINALITY, valEXACTCARDINALITY};

/// Parameter values for parSUBCONCEPTORIGIN
enum SUBTYPES {valNORMALSUB, valDOMAIN, valRANGE};

/// Parameter values for parEQUIVALENTCONCEPTORIGIN
enum EQTYPES {valNORMALEQ, valDISJOINTUNION};

/// Parameter values for parEQUIVALENTROLEORIGIN
enum ERTYPES {valNORMALER, valINVERSES};

/// Parameter values for parASSERTIONTYPE
enum ASSTYPES {valPOSITIVE, valNEGATIVE};

/// Parameter values for parABSTRACTTYPE
enum ABSTYPES {valCONCRETE, valABSTRACT};

/// Parameter values for parINSTANCETYPE
enum INSTANCETYPES {valLITERAL};

/// Defines a type for holding a key with a value.
typedef PAIR<PARAMKEYS,NUMBERORSTRING> PARAMPAIR;

/// Parameters are implemented as STL maps.
typedef MAP<PARAMKEYS, NUMBERORSTRING> PARAMETERS;

/// Parameter iterator.
typedef PARAMETERS::iterator PARAMETERSITERATOR;

/// Parameter result iterator.
typedef PAIR<PARAMETERSITERATOR, bool> PARAMETERSRESULTITERATOR;

/// Vector containing pointers to SROIQ concept expressions.
typedef VECTOR<CONCEPT*> CVECTOR;
typedef CVECTOR::iterator CVECTORITERATOR;

/// Vector containing pointers to SROIQ role expressions.
typedef VECTOR<ROLE*> RVECTOR;
typedef RVECTOR::iterator RVECTORITERATOR;

/// Vector containing pointers to SROIQ instances.
typedef VECTOR<INSTANCE*> IVECTOR;

/// Vector containing pointers to SROIQ subconcept axioms.
typedef VECTOR<SUBCONCEPT*> SCVECTOR;
typedef SCVECTOR::iterator SCVECTORITERATOR;

/// Vector containing pointers to SROIQ equivalent concept axioms.
typedef VECTOR<EQUIVALENTCONCEPTS*> ECVECTOR;
typedef ECVECTOR::iterator ECVECTORITERATOR;


/// Vector containing pointers to SROIQ disjoint concept axioms.
typedef VECTOR<DISJOINTCONCEPTS*> DCVECTOR;
typedef DCVECTOR::iterator DCVECTORITERATOR;

/// Vector containing pointers to SROIQ subrole axioms. 
typedef VECTOR<SUBROLE*> SRVECTOR;
typedef SRVECTOR::iterator SRVECTORITERATOR;

/// Vector containing pointers to SROIQ equivalent role axioms.
typedef VECTOR<EQUIVALENTROLES*> ERVECTOR;
typedef ERVECTOR::iterator ERVECTORITERATOR;

/// Vector containing pointers to SROIQ disjoint role axioms.
typedef VECTOR<DISJOINTROLES*> DRVECTOR;
typedef DRVECTOR::iterator DRVECTORITERATOR;

/// Vector containing pointers to SROIQ concept assertions.
typedef VECTOR<CINSTANCE*> CINSTANCEVECTOR;
typedef CINSTANCEVECTOR::iterator CINSTANCEVECTORITERATOR;

/// Vector containing pointers to SROIQ role assertions.
typedef VECTOR<RINSTANCE*> RINSTANCEVECTOR;
typedef RINSTANCEVECTOR::iterator RINSTANCEVECTORITERATOR;

/// Vector containing pointers to SROIQ same instances axiom.
typedef VECTOR<SAMEINSTANCES*> SIVECTOR;

/// Vector containing pointers to SROIQ different instances axiom.
typedef VECTOR<DIFFERENTINSTANCES*> DIVECTOR;

/// Vector containing pointers to SROIQ haskey axioms. 
typedef VECTOR<HASKEY*> KVECTOR;


#endif /* SROIQ_UTILS_H_ */
